<template>
	<button @click="editJf">修改甲方</button>
	<input type="text" name="zdName" v-model="zd.zdName" placeholder="请输入终端名称"/>
	<button @click="add">添加行政区与终端</button>
	<input type="text" v-model="store.agreement.xybh"/>
	{{store.getAgreementInfo}}
</template>


<script setup lang="ts">
	import { reactive } from 'vue'
	import { useAgreementStore } from '@/stores/agreement'
	import { iface_ssq,iface_zd } from '@/types/global';

	const store = useAgreementStore();
	
	const ssq:iface_ssq = reactive({
		province:'四川省',
		city:'成都市',
		area:'武侯区'
	});
	
	const zd:iface_zd = reactive({
		province:'云南省',
		city:'昆明市',
		area:'官渡区',
		zdName:'官渡医院',
		level:1,
		grade:1
	})

	const editJf = ()=>{
		store.updateAgreementProperty('jf','测试')
	}
	
	const add = () => {
		store.addArea(Object.assign({}, ssq))
		store.addZd(Object.assign({}, zd));
	}
	
</script>

